#include "LightNode.h"
#include "GullEngine.h"

using namespace gull::core;

LightNode::LightNode(const char* name):
SceneNode(name, RENDERPASS_STATIC)
{
	
}


LightNode::LightNode(const LightNode& light):
SceneNode(light.getName(), light.getRenderPassType())
{
	
}

LightNode& 
LightNode::operator=(const LightNode& light)
{
	if(this != &light)
	{
		SceneNode::operator=(light);
		m_properties = light.m_properties;
	}
	
	return *this;
}

LightNode::~LightNode()
{
	
}

gullNotification
LightNode::render(Scene* scene)
{
	const API3D* api = theGullGraphicsManager->get3DAPI();
	api->setLight(*this);
	SceneNode::render(scene);
	return GULL_OK;
}
